<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <link rel="icon" href="/favicon.ico">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>环境监测数据可视化大屏</title>
  <!-- 预加载字体和图标 -->
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
  <!-- 添加全局样式 -->
  <style>
    body {
      margin: 0;
      padding: 0;
      font-family: 'Noto Sans SC', sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      overflow-x: hidden;
    }

    /* 自定义滚动条样式 */
    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    ::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: #555;
    }

    /* 加载动画 */
    #app-loading {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: #f0f2f5;
      z-index: 9999;
      transition: opacity 0.5s;
    }

    .loading-spinner {
      width: 50px;
      height: 50px;
      border: 5px solid rgba(24, 144, 255, 0.2);
      border-radius: 50%;
      border-top-color: #1890ff;
      animation: spin 1s ease-in-out infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }
  </style>
</head>

<body>
  <!-- 加载动画 -->
  <div id="app-loading">
    <div class="loading-spinner"></div>
  </div>

  <!-- Vue应用挂载点 -->
  <div id="app"></div>

  <!-- 应用脚本 -->
  <script type="module" src="/src/main.js"></script>

  <!-- 移除加载动画 -->
  <script>
    window.addEventListener('load', function () {
      const loading = document.getElementById('app-loading');
      if (loading) {
        loading.style.opacity = 0;
        setTimeout(() => {
          loading.style.display = 'none';
        }, 500);
      }
    });
  </script>
</body>

</html>